<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            position: absolute;
            /* top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            margin: auto; */
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            /* margin-left: -150px;
            margin-top: -150px; */
            width: 300px;
            height: 300px;
            background-color: brown;
        }
    </style>
</head>

<body>
    <div class="box">哈哈哈哈哈hasjahjd几乎是多喝水后端就是圣诞节行数点击结束就是稍等接个啥都好说更待何时</div>
</body>

</html>